package org.javaboy.demo;

import okhttp3.OkHttpClient;

public class OkHttpClientFactory {
    private OkHttpClient okHttpClient;

    public OkHttpClient okHttpClient() {
        if (okHttpClient == null) {
            OkHttpClient.Builder builder = new OkHttpClient.Builder();
            builder.setConnectTimeout$okhttp(5000);
            builder.setReadTimeout$okhttp(5000);
            okHttpClient = builder
                    .build();
        }
        return okHttpClient;
    }
}
